<template>
    <p>登录页</p>
    <div>
        账号:
        <el-input v-model="account"></el-input>
    </div>
    <div>
        密码:
        <el-input v-model="password" type="password"></el-input>
    </div>
    <div>
        <button @click="login">登录</button>
    </div>
    <p>account:{{ account }}</p>
    <p>password:{{ password }}</p>
</template>


<script setup>

import {ref} from 'vue'

const account = ref('')
const password = ref('')

function login() {
    if (account.value == 'admin' && password.value == '123456') {
        alert('登录成功')
    } else {
        alert('账号或密码输入错误，请重新输入')
    }
}

</script>